<?php
  session_start();

  if(!isset($_SESSION['isLogged'])){
    header('Location: index.php');
  }
  $now=time();
  if(isset($_SESSION['isLogged']) && ($now>$_SESSION['expired'])){
    session_unset();
    session_destroy();
    header('Location: index.php');
  }

?>
<div class="panel panel-primary">
   <div class="panel-heading">Panel Ubah Password</div>
   <div class="panel-body">
<form role="form" class="form-horizontal" id="ubah_pass_frm" method="post">
	<input type="hidden" class="form-control" id="id_user">
  <div class="form-group">
    <label for="nip" class="col-lg-4 control-label">NIP</label>
    <div class="col-lg-4">
    <input type="text"  class="form-control" id="nip" disabled>
    </div>
  </div>
  <div class="form-group">
    <label for="password_lama" class="col-lg-4 control-label">Password Lama</label>
    <div class="col-lg-4">
    <input type="password" class="form-control" id="password_lama" placeholder="Password">
    </div>
  </div>
  <div class="form-group">
    <label for="password" class="col-lg-4 control-label">Password Baru</label>
    <div class="col-lg-4">
    <input type="password" class="form-control" id="password" placeholder="Password">
    </div>
  </div>
  <div class="form-group">
    <label for="password2" class="col-lg-4 control-label">Ulangi Password Baru</label>
    <div class="col-lg-4">
    <input type="password" class="form-control" id="password2" placeholder="Password">
    </div>
  </div>
  <div class="form-group">
    <div class="col-lg-offset-4 col-lg-10">
	     <button type="submit" class="btn btn-primary" id="btn_ubah_pass">Simpan</button>
    </div>
  </div>
</form>
</div>
</div>

<div id="error" class="alert alert-danger">...</div>
<div id="success" class="alert alert-success">...</div>

<script type="text/javascript" src="js/ubah_pass.js" ></script>